package com.taobao.api.request;

import com.taobao.api.internal.util.RequestCheckUtils;
import java.util.Map;

import com.taobao.api.ApiRuleException;
import com.taobao.api.BaseTaobaoRequest;
import com.taobao.api.internal.util.TaobaoHashMap;

import com.taobao.api.response.TmallExchangeMessagesGetResponse;

/**
 * TOP API: tmall.exchange.messages.get request
 * 
 * @author top auto create
 * @since 1.0, 2018.08.09
 */
public class TmallExchangeMessagesGetRequest extends BaseTaobaoRequest<TmallExchangeMessagesGetResponse> {
	
	

	/** 
	* 换货单号ID
	 */
	private Long disputeId;

	/** 
	* 返回的字段。具体包括：id,refund_id,owner_id,owner_nick,owner_role,content,pic_urls,created,message_type
	 */
	private String fields;

	/** 
	* 留言创建角色。具体包括：卖家主账户(1)、卖家子账户(2)、小二(3)、买家(4)、系统(5)、系统超时(6)
	 */
	private String operatorRoles;

	/** 
	* 页码
	 */
	private Long pageNo;

	/** 
	* 每页条数
	 */
	private Long pageSize;

	public void setDisputeId(Long disputeId) {
		this.disputeId = disputeId;
	}

	public Long getDisputeId() {
		return this.disputeId;
	}

	public void setFields(String fields) {
		this.fields = fields;
	}

	public String getFields() {
		return this.fields;
	}

	public void setOperatorRoles(String operatorRoles) {
		this.operatorRoles = operatorRoles;
	}

	public String getOperatorRoles() {
		return this.operatorRoles;
	}

	public void setPageNo(Long pageNo) {
		this.pageNo = pageNo;
	}

	public Long getPageNo() {
		return this.pageNo;
	}

	public void setPageSize(Long pageSize) {
		this.pageSize = pageSize;
	}

	public Long getPageSize() {
		return this.pageSize;
	}

	public String getApiMethodName() {
		return "tmall.exchange.messages.get";
	}

	public Map<String, String> getTextParams() {		
		TaobaoHashMap txtParams = new TaobaoHashMap();
		txtParams.put("dispute_id", this.disputeId);
		txtParams.put("fields", this.fields);
		txtParams.put("operator_roles", this.operatorRoles);
		txtParams.put("page_no", this.pageNo);
		txtParams.put("page_size", this.pageSize);
		if(this.udfParams != null) {
			txtParams.putAll(this.udfParams);
		}
		return txtParams;
	}

	public Class<TmallExchangeMessagesGetResponse> getResponseClass() {
		return TmallExchangeMessagesGetResponse.class;
	}

	public void check() throws ApiRuleException {
		RequestCheckUtils.checkNotEmpty(disputeId, "disputeId");
		RequestCheckUtils.checkNotEmpty(fields, "fields");
		RequestCheckUtils.checkMaxListSize(fields, 20, "fields");
		RequestCheckUtils.checkMaxListSize(operatorRoles, 20, "operatorRoles");
	}
	

}